package top.lixunda.ecommerce.server.good.api.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import top.lixunda.common.validate.annotation.XumMin;
import top.lixunda.common.validate.annotation.XumNotNull;

/**
 * @author Xumda
 * @version time:2019/12/27 16:49
 * <p>
 * 添加购物车DTO
 */
@ApiModel(value = "添加购物车DTO", description = "添加购物车时上传必要参数的DTO")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class AddUserCarDTO {

    /**
     * 商品id，这里是子商品id，即分类id
     */
    @XumNotNull
    @ApiModelProperty(value = "商品id", notes = "商品id，这里是子商品id，即分类id")
    private Long goodId;

    /**
     * 商品数量
     */
    @ApiModelProperty("商品数量")
    @XumNotNull
    @XumMin(1)
    private Integer count;

}
